{{csrf_field()}}
<input type="hidden" name="renter_id" id="renter_id" value="{{$renter_id}}">
<!--省份-->
<div class="layui-form-item" style="z-index:9999">
    <div class="layui-inline">
        <label class="layui-form-label">所属区域</label>

        <div class="layui-input-block">
            <select name="province_code" lay-filter="province" lay-verify="province"  lay-search="">
                <option value="">请选择省</option>
            </select>
            <input type="hidden" name="province_name" id="province_name"  value="{{$site->province_name??old('province_name')}}">
        </div>

    </div>
</div>
<!--城市-->
<div class="layui-form-item" style="z-index:9999">
    <div class="layui-inline">
        <label class="layui-form-label"></label>

        <div class="layui-input-inline">
            <select name="city_code" id="city_code" lay-filter="city" lay-search="" lay-verify="city">
                <option value="">请选择市</option>
            </select>
            <input type="hidden" name="city">
            <input type="hidden" name="city_name" id="city_name" value="{{$site->city_name??old('city_name')}}">
        </div>
    </div>
</div>
<!--区县-->
<div class="layui-form-item" style="z-index:9999">
    <div class="layui-inline">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <select name="region_code" id="region_code" lay-filter="region" lay-search="" lay-verify="region">
                <option value="">请选择县/区</option>
            </select>
            <input type="hidden" name="region_name" id="region_name" value="{{$site->region_name??old('region_name')}}">
        </div>
    </div>
</div>

<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">站点名称</label>
        <div class="layui-input-inline" >
            <input type="text" name="name" id="device_no" value="{{$site->name??old('name')}}" class="layui-input" lay-verify="required" />
        </div>
    </div>
</div>


<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">站点地址</label>
        <div class="layui-input-inline" >
            <input type="text" name="address" id="address" value="{{$site->address??old('address')}}" class="layui-input" lay-verify="required"/>
        </div>
    </div>
</div>

<div class="layui-form-item device_gg" >
    <div class="layui-inline">
        <label class="layui-form-label">经纬度</label>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="longitude" id="longitude" value="{{$site->longitude??0}}" placeholder="经度"  class="layui-input" lay-verify="required">
        </div>
        <div class="layui-form-mid">*</div>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="latitude" id="latitude" value="{{$site->latitude??0}}" placeholder="纬度"  class="layui-input" lay-verify="required">
        </div>
    </div>
</div>

<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">营业时间</label>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="bh_start" value="{{$site->bh_start??old('bh_start')}}" placeholder="开始时间"  class="layui-input" lay-verify="required">
        </div>
        <div class="layui-form-mid">-</div>
        <div class="layui-input-inline" style="width: 100px;">
            <input type="text" name="bh_end" value="{{$site->bh_end??old('bh_end')}}" placeholder="结束时间"  class="layui-input" lay-verify="required">
        </div>
    </div>
</div>

<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">站点首图</label>
        <div class="layui-input-block">
            <div class="layui-upload">
                <button type="button" class="layui-btn uploadPic" id="uploadPic"><i class="layui-icon">&#xe67c;</i>图片上传</button>
                <div class="layui-upload-list" >
                    <ul id="layui-upload-box" class="layui-clear layui-upload-box">
                        @if(isset($site->imgurl))
                            <li><img src="{{ $site->imgurl }}" /><p>上传成功</p></li>
                        @endif
                    </ul>
                    <input type="hidden" class="layui-upload-input" name="imgurl" id="imgurl" value="{{ $site->imgurl??old('imgurl') }}">
                </div>
            </div>
        </div>
    </div>
</div>


<div class="layui-form-item layui-layout-admin">
    <div class="layui-input-block">
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="formDemo">确 认</button>
    </div>
</div>

